<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="adminCommon :: common-header">
    <title>修改密码</title>
</head>
<body class="sb-nav-fixed">
<nav th:replace="adminCommon :: common-navbar"></nav>
<div id="layoutSidenav">
    <div th:replace="adminCommon :: common-sidenav"></div>

    <div id="layoutSidenav_content">
        <main>
            <div class="container-fluid px-4">
                <h1 class="mt-4">修改密码</h1>
                <ol class="breadcrumb mb-4">
                    <li class="breadcrumb-item"><a th:href="@{/toAdminMain}">主页</a></li>
                    <li class="breadcrumb-item active">修改密码</li>
                </ol>

                <!-- 错误消息显示 -->
                <div th:if="${msg}" class="alert alert-warning" th:text="${msg}"></div>

                <div class="card mb-4">
                    <form th:action="@{/admin/updatePassword}" method="post">
                        <table class="table table-hover">
                            <tr>
                                <td>管理员账号：</td>
                                <td>
                                    <input type="text" class="form-control" readonly
                                           th:value="${admin.adminAccount}" name="adminAccount">
                                </td>
                            </tr>
                            <tr>
                                <td>新密码：</td>
                                <td>
                                    <input type="password" class="form-control" name="newPassword" required>
                                </td>
                            </tr>
                            <tr>
                                <td>确认新密码：</td>
                                <td>
                                    <input type="password" class="form-control" name="confirmPassword" required>
                                </td>
                            </tr>

                        </table>
                        <div style="text-align:center;margin-bottom:15px">
                            <button type="submit" class="btn btn-primary">提交修改</button>
                        </div>
                    </form>
                </div>
            </div>
        </main>


        <footer th:replace="userCommon::common-footer"></footer>
    </div>
</div>

<!-- 页脚脚本 -->
<div th:replace="userCommon :: common-scripts"></div>

</div>
</div>

<!-- 页脚脚本 -->
<div th:replace="userCommon :: common-scripts"></div>

    </div>
</div>
<div th:replace="adminCommon :: common-scripts"></div>
</body>
</html>